import {GROUPS} from '@/services/api'
import {request, METHOD} from '@/utils/request'

export async function listGroupsByPage(currentPage, size) {
    return request(GROUPS, METHOD.GET, {
        currentPage: currentPage,
        size: size
    })
}

export async function totalGroups() {
    return request(GROUPS+"/total", METHOD.GET)
}

export async function deleteGroups(id) {
    return request(GROUPS, METHOD.DELETE, {
        id: id
    })
}

export async function editGroups(group) {
    return request(GROUPS, METHOD.POST, {
        id: group.id,
        name: group.name,
        collegeId: group.collegeId
    })
}
